<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            .box {
                position: relative;
                width: 74px;
                height: 88px;
                border: 1px solid #ccc;
                margin: 100px auto;
                font-size: 12px;
                text-align: center;
                color: #f40;
                /* display: block; */
            }

            .box img {
                width: 60px;
                margin-top: 5px;
            }

            .btn {
                position: absolute;
                top: -1px;
                left: -16px;
                width: 14px;
                height: 14px;
                border: 1px solid #ccc;
                line-height: 14px;
                font-family: Arial, Helvetica, sans-serif;
                cursor: pointer;
            }
        </style>
    </head>
    <body>
        <div class="box">
            淘宝二维码
            <img src="pic/tao.png">
            <i class="btn">x</i>
        </div>
        <script type="text/javascript">
            var btn = document.querySelector('.btn');
            var box = document.querySelector('.box');
            btn.onclick = function() {
                box.style.display = 'none';
            }
        </script>
    </body>
</html>
